<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>“关于我们”列表页面</title>
</head>
<?php 
include_once("inc.php");
include_once("base.php");
$tb_name = "about";
$where_sql = "1=1";
include_once ROOT_PATH."/common/where.php";
$list = db_get_page("select * from $tb_name where $where_sql order by id asc", $page,12);
include_once ROOT_PATH."/common/page.php";
?>
<body>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="17" rowspan="2" valign="top" bgcolor="#FFFFFF"></td>
			<!-- <td valign="top">
				<table width="100%" height="31" border="0" cellpadding="0" cellspacing="0">
					<tr bgcolor="#FFFFFF"><td height="31"><div class="title"><a href="<?php echo $tb_name;?>_edit.php">添加</a></div></td></tr>
				</table>
			</td> -->
			<td width="16" rowspan="2" bgcolor="#FFFFFF"></td>
		</tr>
		<tr>
			<td valign="top" bgcolor="#F7F8F9">
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
					<tr>
						<td colspan="4" height="10"></td>
					</tr>
					<tr>
						<td width="1%">&nbsp;</td>
						<td width="96%">
<!-- 							<table width="100%" class="cont">
								<tr>
									<td>
										<form id="pagerForm" action="?" method="get">
											<input type="hidden" name="pageNum" value="<?php echo $page; ?>"/>&nbsp;
											<input type="text" name="title" class="text" value="<?php echo $_REQUEST["title"]; ?>" placeholder="名称"/>
											<button type="submit"  id="chaxun" class="btn">查询</button>
										</form>
									</td>
								</tr>
							</table> -->
						</td>
						<td width="1%">&nbsp;</td>
					</tr>
					<tr>
						<td width="1%">&nbsp;</td>
						<td width="96%">
							<form action="?" method="get" name="lsm" id="lsm">
								<input type="hidden" name="chk" value="ok" />
								<input type="hidden" name="title" value="<?php echo $_REQUEST["title"]; ?>"/>
								<table width="100%">
									<td colspan="2">
										<table width="100%"  class="cont tr_color">
											<tr>
												<!-- <th width="30" align="center"></th> -->
												<th>名称</th>
												<th width="120">操作</th>
											</tr>
											<?php
											foreach($list["data"] as $row) {
											?>
											<tr align="center" class="d">
												<!-- <td>
													<input type="checkbox" name="sel_id[]" id="sel_id" value="<?php echo $row['id'];?>">
												</td> -->
												<!-- <td></td> -->
												<td>
													<?php echo $row['title'];?>
												</td>
												<td align="center">
													<a href="<?php echo $tb_name;?>_edit.php?id=<?php echo $row['id'];?><?php echo $condition;?>">编辑</a>  
												</td>
											</tr>
											<?php } ?>
											<!-- <tr align="center" class="d">
												<td></td>
												<td colspan="9" align="left">&nbsp;&nbsp;
													<input type="checkbox" id="sel_all" value="yes"  onClick="select_all(this.form)">
													<strong>全选</strong>  
													<select name="sel_do" size="1" id="sel_do">
														<option value="">选择状态</option>
														<option value="删除">删除</option>
													</select>
													<input type="submit" value="操作" onClick="return sel_click(this.form)">
												</td>
											</tr> -->
										</table>
									</td>
								</table><!-- </tr> -->
							</form>
							<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
								<tr>
									<td align="center"><?php echo $page_show;?></td>
								</tr>
							</table>
						</td>
						<td width="1%">&nbsp;</td>
					</tr>
						<tr>
							<td height="20"></td>
						</tr>
				</table>
			</td>
		</tr>
	</table>
<?php
	if ($_REQUEST["act"]=="del") {
		db_del($tb_name,$_REQUEST["id"]);
		urlMsg("25操作成功", $tb_name."_list.php?".$condition);
	}
?>
<script language="javascript">
function select_all(frm)
{
  var i,slength=0;
  if (frm.sel_id==null) { return false; }
  var sall=frm.sel_all.checked;
  if (frm.sel_id.length)
  {
    slength=frm.sel_id.length;
    for (i=0;i<slength;i++) { frm.sel_id[i].checked=sall; }
  }
  else
  { frm.sel_id.checked=sall; }
}

function sel_click(frm)
{
  var i,slength=0,issel=false;
  if (frm.sel_id!=null)
  {
    if (frm.sel_id.length)
    {
      slength=frm.sel_id.length;
      for (i=0;i<slength;i++) { if (frm.sel_id[i].checked==true) { issel=true; break; } }
    }
    else
    { if (frm.sel_id.checked==true) { issel=true; } }
  }
  if (issel==true)
  {
    var cf=window.confirm("03执行此操作后可能无法恢复！你确定吗？");
    if (cf)
    { return true; }
    else
    { return false; }
  }
  else
  {
    alert("没有选择任何记录！");
    return false;
  }
}
</script>
</body>
</html>